Search Interview Questions | More than 3000 questions in repository. There are more than 900 unanswered questions. Click here and help us by providing the answer. Have a video suggestion. Click Correct / Improve and please let us know. |
|
| ||||
Interview Questions and Answers - Order By Newest | ||||
| ||||
This question was recently asked at 'One Click Retail'.This question is still unanswered. Can you please provide an answer. | ||||
Help us improve. Please let us know the company, where you were asked this question : | ||||
Like Discuss Correct / Improve  java 8  lambda expressions Asked in 1 Companies   frequent | ||||
| ||||
Ans. Yes, With Java 8 we can use Interfaces as collection of utility methods through the use of default methods. | ||||
Help us improve. Please let us know the company, where you were asked this question : | ||||
Like Discuss Correct / Improve  java 8  interfaces  utility class   utility classes | ||||
| ||||
Ans. Java 1.8 or Java 8 | ||||
Help us improve. Please let us know the company, where you were asked this question : | ||||
Like Discuss Correct / Improve  default methods   interface default methods   java 8  java 8 features | ||||
| ||||
Ans. By using map , you can transform the object values. The map operation allows us to apply a function, that takes input parameter of one type, and returns something else. Filter is used for filtering the data, it always returns the boolean value. If it returns true, then item is added to list else its filtered out (ignored) | ||||
Help us improve. Please let us know the company, where you were asked this question : | ||||
Like Discuss Correct / Improve  java 8 Asked in 1 Companies | ||||
| ||||
This question is still unanswered. Can you please provide an answer. | ||||
Help us improve. Please let us know the company, where you were asked this question : | ||||
Like Discuss Correct / Improve  Java 8 | ||||
| ||||
Ans. public List convertAllToUpperCase(List words) { return words.stream().map(String::toUpperCase).collect(Collectors.toList()); } @Test public void testAllToUpperCase() { List expected = Arrays.asList("JAVA8", "STREAMS"); List result = convertAllToUpperCase(Arrays.asList("java8", "streams")); assertEquals(expected, result); } | ||||
Help us improve. Please let us know the company, where you were asked this question : | ||||
Like Discuss Correct / Improve  java8  java 8 Asked in 1 Companies | ||||
| ||||
This question was recently asked at 'Number 8'.This question is still unanswered. Can you please provide an answer. | ||||
Help us improve. Please let us know the company, where you were asked this question : | ||||
Like Discuss Correct / Improve  java8  java 8  java lambda expressions Asked in 1 Companies | ||||